<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table border="2">
		<tr>
			<td>id</td>
			<td>
				<input type="text" id="i1">
			</td>
		</tr>
		<tr>
			<td>用户</td>
			<td>
				<input type="text" id="i2">
			</td>
		</tr>
		<tr>
			<td>密码</td>
			<td>
				<input type="password" id="i3">
			</td>
		</tr>
		<tr>
			<td>邮箱</td>
			<td>
				<input type="text" id="i4">
			</td>
		</tr>
	</table>
</body>
	<script type="text/javascript" src="Js/jquery-1.11.0.js"></script>
	<script type="text/javascript">
		$("#i1").blur(function(){
			var val = $("#i1").val();
			$.ajax({
				url:"UserMsg",
				data:{"id":val},
				type:"get",
				success:function(qqq){
					alert("cg");
 					$("#i2").val(qqq.obj.real_name);
					$("#i3").val(qqq.obj.password);
					$("#i4").val(qqq.obj.email);
				},
				error:function(){
					alert("该id已不存在,请重试")
				}
			});
		});
	</script>

</html>